package com.tuanzi.loan.web.lazy.galaxycard;

import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import org.springframework.data.domain.Page;

import com.tuanzi.loan.vo.request.galaxycard.GalaxyCardPrivilegeStatusSearchRequest;
import com.tuanzi.loan.vo.response.galaxycard.GalaxyCardPrivilegeStatusSearchResponse;
import com.tuanzi.loan.business.service.galaxycard.GalaxyCardPrivilegeStatusService;

/**
 * 权益状态管理 DataModel
 * @author JinRuiyang 2018/2/9 17:16:07
 */
public class GalaxyCardPrivilegeStatusDataModel extends
        BaseLazyDataModel<GalaxyCardPrivilegeStatusSearchRequest, GalaxyCardPrivilegeStatusSearchResponse> {

    private GalaxyCardPrivilegeStatusService galaxycardprivilegestatusService = SpringContextHolder.getBean(GalaxyCardPrivilegeStatusService.class);

    public GalaxyCardPrivilegeStatusDataModel(GalaxyCardPrivilegeStatusSearchRequest searchRequest) {
        super(searchRequest);
    }

    @Override
    protected Page<GalaxyCardPrivilegeStatusSearchResponse> doLoad(PageSearcher<GalaxyCardPrivilegeStatusSearchRequest> pageSearcher) {
        return galaxycardprivilegestatusService.list(pageSearcher);
    }
}
